package com.linked.goods.shop.bean.po;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.linked.goods.shop.bean.dto.ShopDTO;
import lombok.Data;

import java.time.LocalDateTime;

/**
 * @author :dbq
 * @date : 2023/5/25 10:24
 * @description : desc
 */
@Data
@TableName("goods_shop_info")
public class ShopInfoPO {
    @TableId(value = "shop_id", type = IdType.ASSIGN_UUID)
    private String shopId;
    @TableField("shop_name")
    private String shopName;
    @TableField("user_id")
    private String userId;
    @TableField("shop_desc")
    private String shopDesc;
    @TableField("shop_log")
    private String shopLog;
    @TableField("remarks")
    private String remarks;
    @TableField("create_time")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime createTime;
    @TableField("data_status")
    private Integer dataStatus;

    public ShopInfoPO(ShopDTO param) {
        this.shopName = param.getShopName();
        this.userId = param.getUserId();
        this.shopDesc = param.getShopDesc();
        this.shopLog = param.getShopLog();
        this.remarks = param.getRemarks();
    }
}
